package com.cat.binaryTree;

/**
 * @author 曲大人的喵
 * @description https://leetcode.cn/problems/KnLfVT/
 * @create 2025/9/13 18:02
 * @since JDK17
 */

public class Solution30 {
    void f(TreeNode root) {
        if (root.left != null) {
            root.left = new TreeNode(-1, root.left, null);
            f(root.left.left);
        }
        if (root.right != null) {
            root.right = new TreeNode(-1, null, root.right);
            f(root.right.right);
        }
    }
    public TreeNode expandBinaryTree(TreeNode root) {
        f(root);
        return root;
    }
}
